<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;

        }
        body{
            width: 100%;
            height: 100%;
            background-color: mintcream;
            /*background-image: url("img/timg.jpg") ;*/
            /*background-repeat: no-repeat;*/
            /*<img src="img/IDR_PRODUCT_LOGO.png" height="32" width="171"/>*/
        }
        #login{

            width: 380px;
            height: 255px;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-left: -150px;
            margin-top: -125px;
            border-radius: 30px ;
            background-repeat: no-repeat;

        }
        #login input{
            text-align: center;
            width: 260px;
            height: 30px;
            border:  3px solid black;
            border-radius: 5px;
            margin: 10px 10px;
            box-sizing: border-box;

        }
        #login button{
            width: 120px;
            height: 40px;
            font-size: 20px;
            border-radius: 2px;
        }
        #login div{
            text-align: center;

        }
       </style>
</head>
<body>
<div id="login">
    <form action="" method="get">
        <div><img src="img/IDR_PRODUCT_LOGO.png" height="32" width="171"/></div>

        <div>
            <input id="s1" type="text"name="username" placeholder="请输入账号\手机号" onblur="f1()">
            <span>*</span>

            <br>
            <span id="span1"></span>
        </div>
        <div>
            <input type="password" name="userpwd" placeholder="密码" onblur="f1()">
            <span>*</span>
            <br>
            <span id="span2">*</span>
        </div>
        <div>
            <button type="submit">登录</button>
        </div>
        <div>
            忘记密码<a href="">&nbsp;&nbsp;找回密码</a>
        </div>
    </form>
</div>
</body>
<script>
    function $(id) {
        return document.getElementById(id);
    }
    function f1() {
        var m1 =  $("s1").value;
        var msg = "请输入正确的账号";
        if (m1<6||m1>15){
            $("span1").innerHTML = msg
        }
    }

</script>
</html>